<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="FCK"  uri="http://java.fckeditor.net"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>S6办公系统</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript">
function check(){
	

	var title =document.getElementById("title").value.toLowerCase();

	if(title==""){
		alert('标题不能为空');
		 return false;
		}
 return true;
	}
	function addMore(){
	var td =document.getElementById('more');
	var br =document.createElement("br");
	var input =document.createElement("input");
	var button =document.createElement("input");
	input.type="file";//设置input属性
	input.name="file";
	button.type="button";//设置button属性
	button.value="删除";
	button.onclick=function(){
	td.removeChild(br);//移除
	td.removeChild(input);
	td.removeChild(button);
	}
	td.appendChild(br);//添加
	td.appendChild(input);
	td.appendChild(button);
	}
</script>
</head>

<body style="background-color:#D6D3C9;">
<form action="Emailadd.action" method="post" enctype="multipart/form-data" onsubmit="return check()">
<table>
<tr>
<td>主题：</td>
<td><input type="text" id="title" name="email.title"/></td>
</tr>
<tr>
<td>发件人：</td>
<td><p><s:property value="user.name"/></p></td>
</tr>
<tr>
<td>收件人：</td>
<td>
<s:select value="" name="email.userinfoByToUserinfOid.id" theme="simple" list="touser" listKey="id" listValue="name" >   
      </s:select>
</td>
</tr>
<tr>
<td>正文：</td>
<td><FCK:editor instanceName="email.content" basePath="/fckeditor" 
  								height="300px" width="600px"></FCK:editor></td>
</tr>
<tr>
<td colspan="2" id="more"><input type="file" name="file" /><input type="button" value="继续添加" onclick="addMore()"/>
<s:fielderror/> 
</td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="发送" /></td>
</tr>
</table>
</form>
</body>
</html>